// gxc.table.create 示例
function showTable(data) {
	gxc.table.create({
		data : data, // 数组
		renderTo : "#tableDiv",
		calssName : "myTable", // table的class，已有默认class="gxc_table"
		columns : [ {
			text : "ID",
			name : "id",
			width : "20%",
			className : "td_id", // td的class
			render : render_id // 替换内容函数
		}, {
			text : "用户账号",
			name : "code",
			width : "30%"
		}, {
			text : "用户姓名",
			name : "name",
			width : "50%"
		} ]
	})
}

function render_id(item) {
	return item.id + " render";
}

gxc.table.createGrid({
	name: "user_grid",
	url: "/system/User/listPage.do",
	withCheckbox: false,
	withRowNum: false,
	stripeRows: true,
	stripeOverRow: true,
	withPagebar: true,
	pageSize: 10,
	renderTo: "#div_user_grid",
	fieldSort: "update_time desc",
	loading: loadingFunc,
	columns : [ {
		text : "ID",
		name : "id",
		width : "20%",
		className : "td_id", // td的class
		render : render_id // 替换内容函数
	}, {
		text : "用户账号",
		name : "code",
		width : "30%"
	}, {
		text : "用户姓名",
		name : "name",
		width : "50%"
	} ]
})
// 显示grid
gxc.grid.user_grid.show();

function search(){
	var params = gxc.form.getParams("#form1");
	mygrid.pageInfo.currentPage = "1";
	mygrid.params = params;
	mygrid.reload();
}